<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>悬停动效</title>
</head>
<body>
    <div class="con">
        <a href="https://www.bilibili.com/video/BV1u64y1a7hW?spm_id_from=333.337.search-card.all.click" target="-blank"
            class="item">
            <img src="./遥远的她.jpg" alt=""></a>
        <a href="https://www.bilibili.com/video/BV1u64y1a7hW?spm_id_from=333.337.search-card.all.click" target="-blank"
            class="play-btn"></a>
        <a href="https://www.bilibili.com/video/BV1u64y1a7hW?spm_id_from=333.337.search-card.all.click" target="-blank"
            class="mask">
            <h1>她在哪里</h1>
            <p>远方的她，正无语凝眸，望眼欲穿。。。</p>
        </a>
    </div>

    <style>
        a{
            /*取消超链接默认的下划线*/
            text-decoration: none;
            /*a以块元素显示*/
            display: block;
        }

        .con{
            position: relative;
            width: 400px;
        }

        .con .item{
            width: 100%;
            height: 100%;
        }

        .con .item img{
            width: 100%;
        }

        .play-btn{
            opacity: 0;
            position: absolute;
            width: 56px;
            height: 56px;
            right: 10%;
            bottom: 10%;
            background: url(./下载播放.png) no-repeat center center;
            transition: opacity 0.5s ease-in-out 0.5s;
        }

        .con:hover .play-btn{
            opacity: 1;
        }

        .mask{
            width: 100%;
            height: 0;
            position: absolute;
            bottom: 0;
            transition: height .5s ease-in-out ;
            overflow: hidden;
        }

        .con:hover .mask{
            height: 100%;
        }
    </style>
</body>
</html>